use FindBin;
use Getopt::Long;

use lib $FindBin::Bin."/..";
use lib $FindBin::Bin."/../hoster";
use lib $FindBin::Bin."/../hoster/configs";

use Netloadin;

require 'config.pl';

Getopt::Long::Configure ("bundling");
GetOptions ('file|f=s'   => \$file,
            'random|r=s'   => \$rand,
            );

my $current_upload_link = Netloadin::upload($file, $::hoster_config);

open(file, ">".$::spreader_tmp_dir_instances.$rand);
    print file $current_upload_link;
close (file);

return 1;